import request from '@/utils/request'

// 获取年度项目列表
export function getAnnualist(data) {
  return request({
    url: '/plan/list',
    method: 'get',
    params: data
  })
}
// 获取年度项目列表详情信息
export function getListingDetail(data) {
  return request({
    url: '/plan/' + data,
    method: 'get',
  })
}
// 获取年度项目列表表格详情信息
export function getTableDetail(params) {
  return request({
    url: `/plan/selectPlanNumber`,
    method: 'get',
    params
  })
}
// 获取年度项目列表表格详情信息
export function getExpertId(id) {
  return request({
    url: `/system/task/detailByPlan/${id}`,
    method: 'get',
  })
}
// 新增年度项目计划
export function getAddPlan(data) {
  return request({
    url: '/plan',
    method: 'post',
    data: data
  })
}
// 修改年度项目计划
export function getEditPlan(id, data) {
  return request({
    url: '/plan/edit/' + id,
    method: 'put',
    data: data
  })
}
//获取年份
export function getYear(data) {
  return request({
    url: '/plan/getYear',
    method: 'get',
    // data:data
  })
}
//修改状态
export function getUpdateStag(data) {
  return request({
    url: '/plan/updateStag/' + data,
    method: 'post',
    // data:data
  })
}
//删除年度项目
export function getDelete(data) {
  return request({
    url: '/plan/' + data,
    method: 'delete',
    // data:data
  })
}
// 审核
export function getApprovalAdd(data) {
  return request({
    url: '/web/approval/add',
    method: 'post',
    data: data
  })
}
//抽取专家
export function getSxpertExtract(data) {
  return request({
    url: '/extractRule/beginExtract',
    method: 'post',
    data: data
  })
}
//重新抽取
export function getReplaceExtract(data) {
  return request({
    url: '/extractRule/beginExtract',
    method: 'put',
    data: data
  })
}
//提交审核
export function getTaskAdd(data) {
  return request({
    url: '/system/task/add',
    method: 'post',
    data: data
  })
}
//查看详情
export function getDeclaration(data) {
  return request({
    url: '/annualDeclaration/' + data,
    method: 'get',
    // params:data
  })
}
//删除上传的专家评审评论
export function deleteFile(data) {
  return request({
    url: '/plan/deleteFile?fileId=' + data,
    method: 'delete',
    // params:data
  })
}
//专家评审评论确定
  export function upLoadFile(data,id) {
    return request({
      url: '/plan/upload/'+ id,
      method: 'post',
      data:data
    })
  }
// 终止计划
export function terminatePlan(planId) {
  return request({
    url: `/plan/terminateAnnualPlan/${planId}`,
    method: 'get'
  })
}
// 增补转年度
export function supplementToYear(planId,proId) {
  return request({
    url: `plan/supplement2year/${planId}/${proId}`,
    method: 'get'
  })
}

// 查询 监控判断是否抽取过
export function geMonitoringGet(data) {
  return request({
    url: "/monitoring/get",
    method: "get",
    params:data
  });
}